<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    let obj = {
      name: "liudehua",
      sing: function (x, y) {
        // console.log("lenglengdebingyuzailianshanghuluandepai!!");
        console.log(x + y);

        return x + y;
      },
      dance: function () {
        console.log("yidada~erdada~");
      }
    };

    // 方法调用 对象名.方法名
    obj.sing(1, 3);
    obj.dance();
    console.log(obj.sing(1, 5));
  </script>
</body>

</html>